function Browser() {
	var b = navigator.appName;
	if (b == "Netscape")
		this.b = "ns";
	else if ((b == "Opera") || (navigator.userAgent.indexOf("Opera") > 0))
		this.b = "opera";
	else if (b == "Microsoft Internet Explorer")
		this.b = "ie";
	if (!b)
		alert('Unidentified browser./nThis browser is not supported,');
	this.version = navigator.appVersion;
	this.v = parseInt(this.version);
	this.ns = (this.b == "ns" && this.v >= 4);
	this.ns4 = (this.b == "ns" && this.v == 4);
	this.ns6 = (this.b == "ns" && this.v == 5);
	this.ie = (this.b == "ie" && this.v >= 4);
	this.isIE = (this.b == "ie" && this.v >= 4);
	this.ie4 = (this.version.indexOf('MSIE 4') > 0);
	this.ie5 = (this.version.indexOf('MSIE 5') > 0);
	this.ie55 = (this.version.indexOf('MSIE 5.5') > 0);
	this.ie6 = (this.version.indexOf('MSIE 6') > 0);
	this.opera = (this.b == "opera");
	this.dom = (document.createElement && document.appendChild && document.getElementsByTagName) ? true
			: false;
	this.def = (this.ie || this.dom);
	var ua = navigator.userAgent.toLowerCase();
	if (ua.indexOf("win") > -1)
		this.platform = "win32";
	else if (ua.indexOf("mac") > -1)
		this.platform = "mac";
	else
		this.platform = "other";
}
var is = new Browser();
var ArrayKeyBoard = new Array();
var objVP;
var onVP = false;
var alrt;
var textboxpositionstatus = new Object();
textboxpositionstatus["alpha"] = false;
textboxpositionstatus["numeric"] = false;
textboxpositionstatus["charIcons"] = false;
var activeType = '';
var globalAlpha = '';
var globalNumeric = '';
var globalcharIcons = '';
var openBoth = 0;
function startDrag(e) {
	if (is.platform != "mac") {
		if (onVP == true) {
			objVP = document.getElementById("MagicVirtualPadLayer_"
					+ activeType);
			objVP = objVP.style;
			if (is.ie) {
				X = event.clientX - objVP.pixelLeft;
				Y = event.clientY - objVP.pixelTop;
			} else {
				X = e.clientX - parseInt(objVP.left);
				Y = e.clientY - parseInt(objVP.top);
			}
		}
	}
}
function drag(e) {
	if (is.platform != "mac") {
		if (objVP) {
			if (is.ie) {
				objVP.pixelTop = event.clientY - Y;
				objVP.pixelLeft = event.clientX - X;
			} else {
				objVP.left = parseInt(e.clientX) - X + "px";
				objVP.top = parseInt(e.clientY) - Y + "px";
			}
			return false;
		}
	}
}
function endDrag() {
	objVP = null;
}
function lcase(ch) {
	if (ch == 'İ') {
		return 'i';
	}
	if (ch == 'I') {
		return 'ı';
	}
	if (ch == 'Ğ') {
		return 'ğ';
	}
	if (ch == 'Ş') {
		return 'ş';
	}
	if (ch == 'Ö') {
		return 'ö';
	}
	if (ch == 'Ü') {
		return 'ü';
	}
	if (ch == 'Ç') {
		return 'ç';
	}
	return ch.toLowerCase();
}
function ucase(ch) {
	if (ch == 'i') {
		return 'İ';
	}
	if (ch == 'ı') {
		return 'I';
	}
	if (ch == 'ğ') {
		return 'Ğ';
	}
	if (ch == 'ş') {
		return 'Ş';
	}
	if (ch == 'ö') {
		return 'Ö';
	}
	if (ch == 'ü') {
		return 'Ü';
	}
	if (ch == 'ç') {
		return 'Ç';
	}
	return ch.toUpperCase();
}
document.onmousedown = startDrag;
document.onmousemove = drag;
document.onmouseup = endDrag;
var tmout = null;
function MagicVirtualPad(nm, type) {
	if (!type) {
		type = "alpha";
	}
	this.type = type;
	if (this.type == "alpha") {
		globalAlpha = this;
		this.Tempx = null;
		this.APad = 'abcçdefgğhıijklmnoöpqrsştuüvwxyz1234567890 !#$+%&/()=}{?\\*-:;.,@><';
		this.QPad = 'qwertyuıopğüasdfghjklşizxcvbnmöç7894561230 !#$+%&/()=}{?\\*-:;.,@><';
		this.maxlength = 1;
		this.keyPad = this.QPad;
		this.keyPadClon = this.keyPad;
		this.strHTML = '';
		this.name = nm;
		this.cs = false;
		this.closed = false;
		this.visible = 'hidden';
		this.currentKeyValue = '';
		this.currentInputObject = 'none';
		this.currentKeyObject = 'none';
		this.mdown = false;
		this.mdownStr = ' ';
		this.chkMouseOver = false;
		this.karistir = true;
	} else if (this.type == "numeric") {
		globalNumeric = this;
		this.Tempx = null;
		this.APad = '1234567890';
		this.QPad = '7894561230';
		this.maxlength = 1;
		this.keyPad = this.QPad;
		this.keyPadClon = this.keyPad;
		this.strHTML = '';
		this.name = nm;
		this.cs = false;
		this.closed = false;
		this.visible = 'hidden';
		this.currentKeyValue = '';
		this.currentInputObject = 'none';
		this.currentKeyObject = 'none';
		this.mdown = false;
		this.mdownStr = ' ';
		this.chkMouseOver = false;
		this.karistir = true;
	} else if (this.type = "charIcons") {
		globalcharIcons = this;
		this.CPad = '!#$+%/()=}{?\*-:;.,@><';
		this.maxlength = 1;
		this.keyPad = this.CPad;
		this.keyPadClon = this.keyPad;
		this.strHTML = '';
		this.name = nm;
		this.cs = false;
		this.closed = false;
		this.visible = false;
		this.currentKeyValue = '';
		this.currentInputObject = 'none';
		this.currentKeyObject = 'none';
		this.mdown = false;
		this.mdownStr = ' ';
	}
}
MagicVirtualPad.prototype.show = function(t) {
	if (!this.closed) {
		if (this.type == "alpha") {
			this.visible = 'visible';
			if (openBoth == 0 && globalNumeric != '' && globalcharIcons != '') {
				globalNumeric.close();
				globalcharIcons.close();
			}
		} else if (this.type == "numeric") {
			this.visible = true;
			if (openBoth == 0 && globalAlpha != '' && globalcharIcons != '') {
				globalAlpha.close();
				globalcharIcons.close();
			}
		} else if (this.type == "charIcons") {
			this.visible = true;
			if (openBoth == 0 && globalNumeric != '' && globalAlpha != '') {
				globalAlpha.close();
				globalNumeric.close();
			}
		}
		document.getElementById("MagicVirtualPadLayer_" + this.type).style.visibility = 'visible';
		this.updateKeyValues();
		if (t) {
			textboxposition(t, this.type);
		}
	}
}
MagicVirtualPad.prototype.hide = function() {
	if (!this.closed) {
		if (this.type == "alpha") {
			this.visible = 'hidden';
		} else if (this.type == "numeric") {
			this.visible = false;
		} else if (this.type == "charIcons") {
			this.visible = false;
		}
		document.getElementById("MagicVirtualPadLayer_" + this.type).style.visibility = 'hidden';
	}
}
MagicVirtualPad.prototype.close = function() {
	this.hide();
	if (this.type == "alpha") {
		if (textboxpositionstatus[this.type]) {
			document.getElementById("MagicVirtualPadLayer_" + this.type).style.top = 0;
			document.getElementById("MagicVirtualPadLayer_" + this.type).style.left = 0;
		}
	}
	this.closed = true;
	this.loseFocus();
}
MagicVirtualPad.prototype.open = function() {
	this.show();
	this.closed = false;
}
MagicVirtualPad.prototype.del = function() {
	if (this.currentInputObject == 'none') {
		this.currentInputObject = "MusteriNumarasi";
	}
	if (document.getElementById(this.currentInputObject).value.length > 0) {
		ostr = document.getElementById(this.currentInputObject).value;
		ostr = ostr.substr(0, ostr.length - 1);
		document.getElementById(this.currentInputObject).value = ostr;
	}
}
MagicVirtualPad.prototype.tab = function() {
}
MagicVirtualPad.prototype.init = function(top, left) {
	if (!top) {
		top = 0;
	}
	if (!left) {
		left = 0;
	}
	if (this.type == "alpha") {
		this.strHTML = '';
		this.divHTML = '';
		if (is.platform != 'mac' || is.b == 'ns') {
			if (is.safari == true) {
				this.divHTML += '<div id="MagicVirtualPadLayer_' + this.type
						+ '" style="position:absolute;left:' + left + 'px;top:'
						+ top + 'px;width:230px;visibility:' + this.visible
						+ ';height:222px;z-index:100">';
			} else {
				if (is.ie) {
					this.divHTML += '<div id="MagicVirtualPadLayer_'
							+ this.type + '" style="position:absolute;left:'
							+ left + 'px;top:' + top
							+ 'px;width:230px;visibility:' + this.visible
							+ ';height:222px;z-index:100;">';
				} else {
					this.divHTML += '<div id="MagicVirtualPadLayer_'
							+ this.type + '" style="position:absolute;left:'
							+ left + 'px;top:' + top
							+ 'px;width:230px;visibility:' + this.visible
							+ ';height:222px;z-index:100">';
				}
			}
		} else {
			this.divHTML += '<div id="MagicVirtualPadLayer_' + this.type
					+ '" style="position:absolute;left:' + left + 'px;top:'
					+ top + 'px;width:230px;visibility:' + this.visible
					+ ';height:222px;z-index:100">';
		}
	} else if (this.type == "numeric") {
		this.divHTML = '';
		if (is.platform != 'mac') {
			this.divHTML += '<div id="MagicVirtualPadLayer_'
					+ this.type
					+ '" style="position:absolute;left:'
					+ left
					+ 'px;top:'
					+ top
					+ 'px;width:169px;visibility:hidden;height:216px;z-index:999;">';
		} else {
			this.divHTML += '<div id="MagicVirtualPadLayer_'
					+ this.type
					+ '" style="position:absolute;left:'
					+ left
					+ 'px;top:'
					+ top
					+ 'px;width:169px;visibility:hidden;height:216px;z-index:999;">';
		}
	} else if (this.type == "charIcons") {
		this.divHTML = '';
		if (is.platform != 'mac') {
			this.divHTML += '<div id="MagicVirtualPadLayer_'
					+ this.type
					+ '" style="position:absolute;left:'
					+ left
					+ 'px;top:'
					+ top
					+ 'px;width:169px;visibility:hidden;height:216px;z-index:999;">';
		} else {
			this.divHTML += '<div id="MagicVirtualPadLayer_'
					+ this.type
					+ '" style="position:absolute;left:'
					+ left
					+ 'px;top:'
					+ top
					+ 'px;width:169px;visibility:hidden;height:216px;z-index:999;">';
		}
	}
	this.divHTML += '</div>';
	this.createKeyBoard();
	if (is.ns) {
		document.write(this.divHTML);
		document.write('<div id="tempDiv_' + this.type + '">' + this.strHTML
				+ '</div>');
		document.getElementById('MagicVirtualPadLayer_' + this.type).innerHTML = document
				.getElementById('tempDiv_' + this.type).innerHTML;
		document.getElementById('tempDiv_' + this.type).innerHTML = '';
	} else {
		document.write('<span id="PadContent_' + this.type + '"></span>');
		document.getElementById('PadContent_' + this.type).innerHTML = this.divHTML;
		document.getElementById('MagicVirtualPadLayer_' + this.type).innerHTML = this.strHTML;
	}
	this.obfuscate();
}
MagicVirtualPad.prototype.overWriteKontrol = function() {
	if (document.getElementById("chkOverWrite").checked) {
		this.chkMouseOver = true;
	} else {
		this.chkMouseOver = false;
	}
}
MagicVirtualPad.prototype.initOnResize = function() {
	if (this.type == "alpha") {
		if (is.platform == 'mac' && is.b != 'ns') {
			lf = (parseInt(parseInt(document.body.width) - 701) / 2) + 17;
		} else {
			lf = (parseInt(parseInt(document.body.scrollWidth) - 701) / 2) + 17;
		}
		if (is.safari == true && (is.platform != 'mac' || is.b == 'ns'))
			lf += -10;
		document.getElementById('MagicVirtualPadLayer_' + this.type).style.left = lf;
	}
}
MagicVirtualPad.prototype.createKeyBoard = function() {
	if (this.type == "alpha") {
		this.strHTML = '';
		this.strHTML += '<div id="SanalKlavye"><div class="area"><table cellpadding="0" cellspacing="0" border="0" width="440">';
		this.strHTML += '<tr><td colspan="3">'
		this.strHTML += '<table cellspacing="0" cellpadding="0" border="0" width="440" onMouseDown="onVP=true;activeType=\'alpha\';" style="cursor:move;" onMouseUp="onVP=false;'
				+ this.name
				+ '.clicked(-100);activeType=\'\';" class="tblHead"><tr><td align="left"><div class="topButtons"><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.ChangeKeyboard(\'Q\');" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img src="'
				+ qKlavyeButon
				+ '" class="buton" /></a><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.ChangeKeyboard(\'A\');" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img src="'
				+ alfabetikButon
				+ '" class="buton" /></a><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.obfuscate();'
				+ this.name
				+ '.setKaristir(true);" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img id="sanalKlavyeKaristirButtonId" src="'
				+ sabitleButon
				+ '" class="buton" /></a><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.lowerCase();" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img src="'
				+ kucukHarfButon
				+ '" class="buton" /></a><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.upperCase();" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img src="'
				+ buyukHarfButon
				+ '" class="buton" /></a></div></td><td align="right"><div class="close"><a href="javascript:'
				+ this.name
				+ '.close();"><img src="'
				+ kapatButon
				+ '" /></a></div></td></tr></table></td></tr>';
		this.strHTML += '<tr><td width="276" align="center" valign="top"><div class="klavye_alfa_area">';
		for (i = 0; i <= 31; i++) {
			k = this.keyPad.charAt(i);
			this.strHTML += '<div class="karakter"><input id="M' + i
					+ '" name="M' + i + '" type="button" value="' + k
					+ '" onmouseover="' + this.name + '.Ekle(' + i
					+ ');" onmouseout="' + this.name
					+ '.Ekleme();" onMouseUp="' + this.name + '.clicked(' + i
					+ ')" onMouseDown="' + this.name
					+ '.setStars(this);" style="cursor:hand;"></div>';
			if (i == 11) {
				this.strHTML += '<div class="clr"></div><div style="padding-left:14px;">'
			}
			if (i == 22) {
				this.strHTML += '</div><div class="clr"></div><div style="padding-left:38px;">'
			}
		}
		this.strHTML += '</div><div class="clr"></div>';
		this.strHTML += '<input id="M42" name="M42" type="button" align="center" value="" onMouseUp="'
				+ this.name
				+ '.clicked(42)" onMouseDown="'
				+ this.name
				+ '.setStars(this);" class="buton_bosluk">';
		this.strHTML += '</div></td>';
		this.strHTML += '<td width="40" align="center" valign="top"><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.del();'
				+ this.name
				+ '.clearStars();" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img src="'
				+ silButon
				+ '" class="buton" /></a><img src="/EposWeb/resources/images/spacer.gif" width="39" height="50" /></td>';
		this.strHTML += '<td width="70" align="center" valign="top"><div class="klavye_num_area">';
		for (i = 32; i <= 41; i++) {
			k = this.keyPad.charAt(i);
			if (k == '"') {
				k = '&quot;';
			}
			this.strHTML += '<div class="karakter"><input id="M' + i
					+ '" name="M' + i + '" type="button" value="' + k
					+ 'a" onmouseover="' + this.name + '.Ekle(' + i
					+ ');" onmouseout="' + this.name
					+ '.Ekleme();" onMouseUp="' + this.name + '.clicked(' + i
					+ ')" onMouseDown="' + this.name
					+ '.setStars(this);" style="cursor:hand;"></div>';
			if (i == 34 || i == 37) {
				this.strHTML += '<div class="clr"></div>'
			}
			if (i == 40) {
				this.strHTML += '<div class="clr"></div><div style="padding-left:24px;">'
			}
		}
		this.strHTML += '</div></div></td>';
		this.strHTML += '</tr>';
		this.strHTML += '<tr><td colspan="3">';
		this.strHTML += '<div class="butonlar">';
		this.strHTML += '<tr><td width="276" align="center" valign="top"><div class="klavye_char_area">';
		for (i = 43; i <= 65; i++) {
			k = this.keyPad.charAt(i);
			this.strHTML += '<div class="karakter"><input id="M' + i
					+ '" name="M' + i + '" type="button" value="' + k
					+ '" onmouseover="' + this.name + '.Ekle(' + i
					+ ');" onmouseout="' + this.name
					+ '.Ekleme();" onMouseUp="' + this.name + '.clicked(' + i
					+ ')" onMouseDown="' + this.name
					+ '.setStars(this);" style="cursor:hand;"></div>';
			if (i == 54) {
				this.strHTML += '<div class="clr"></div>'
			}
		}
		this.strHTML += '</div></td>';
		this.strHTML += '<td colspan="2"><span class="txtDipnot"><table><tr><td><input type="checkbox" id="chkOverWrite" onclick="'
				+ this.name
				+ '.overWriteKontrol()" /></td><td> <div id="bekleyerekYazdirText"></div></td></tr></table></span></td>';
		this.strHTML += '</tr>';
		this.strHTML += ' </div>';
		this.strHTML += '</div>';
		this.strHTML += '<input id="mask_alpha" type="button" value=" " onMouseUp="'
				+ this.name
				+ '.forwardClick()" style="position:absolute;display:none;" onMouseOut="'
				+ this.name + '.clearStars();">';
		this.strHTML += '</td></tr>'
		this.strHTML += '</table>';
		this.strHTML += '</td></tr></table>';
	} else if (this.type == "numeric") {
		this.strHTML = '';
		this.strHTML += '<div id="SanalNumpad"><div class="area"><table cellpadding="0" cellspacing="0" border="0" width="169">';
		this.strHTML += '<tr><td colspan="2">'
		this.strHTML += '<table cellspacing="0" cellpadding="0" border="0" width="169" onMouseDown="onVP=true;activeType=\'numeric\';" style="cursor:move;" onMouseUp="onVP=false;'
				+ this.name
				+ '.clicked(-100);activeType=\'\';" class="tblHead"><tr><td align="left"><div class="topButtons"><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.obfuscate();'
				+ this.name
				+ '.setKaristir(true);" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img id="sanalKlavyeKaristirButtonId" src="'
				+ sabitleButon
				+ '" class="buton" /></a></div></td><td align="right"><div class="close"><a href="javascript:'
				+ this.name
				+ '.close();"><img src="'
				+ kapatButon
				+ '" /></a></div></td></tr></table></td></tr>';
		this.strHTML += '<tr><td width="40" align="center" valign="top"><div class="klavye_kontrol_area"><a href="javascript:;" onMouseUp="'
				+ this.name
				+ '.del();'
				+ this.name
				+ '.clearStars();" onMouseDown="'
				+ this.name
				+ '.setStars(this);"><img src="'
				+ silButon
				+ '" class="buton" /></a><img src="/EposWeb/resources/images/spacer.gif" width="39" height="50" class="buton" /></div></td>';
		this.strHTML += '<td width="70" align="center" valign="top"><div class="klavye_num_area">';
		for (i = 0; i <= 9; i++) {
			k = this.keyPad.charAt(i);
			if (k == '"') {
				k = '&quot;';
			}
			this.strHTML += '<div class="karakter"><input id="M' + i
					+ '" name="M' + i + '" type="button" value="' + k
					+ 'a" onmouseover="' + this.name + '.Ekle(' + i
					+ ');" onmouseout="' + this.name
					+ '.Ekleme();" onMouseUp="' + this.name + '.clicked(' + i
					+ ')" onMouseDown="' + this.name
					+ '.setStars(this);" style="cursor:hand;"></div>';
			if (i == 2 || i == 5) {
				this.strHTML += '<div class="clr"></div>'
			}
			if (i == 8) {
				this.strHTML += '<div class="clr"></div><div style="padding-left:24px;">'
			}
		}
		this.strHTML += '</div></div></td>';
		this.strHTML += '</tr>';
		this.strHTML += '<tr>';
		this.strHTML += '<td colspan="2"><span class="txtDipnot" style="padding-left:20px;padding-top:10px"><table><tr><td><input type="checkbox" id="chkOverWrite" onclick="'
				+ this.name
				+ '.overWriteKontrol()" /></td><td><div id="bekleyerekYazdirText"></div></td></tr></table></span></td>';
		this.strHTML += '</tr>';
		this.strHTML += ' </div>';
		this.strHTML += '</div>';
		this.strHTML += '<input id="mask_numeric" type="button" value=" " onMouseUp="'
				+ this.name
				+ '.forwardClick()" style="position:absolute;display:none;" onMouseOut="'
				+ this.name + '.clearStars();">';
		this.strHTML += '</td></tr>'
		this.strHTML += '</table>';
		this.strHTML += '</td></tr></table>';
	} else if (this.type == "charIcons") {
		this.strHTML = '';
		this.strHTML += '<table cellpadding="0" cellspacing="0" border="0" width="169">';
		this.strHTML += '<tr><td align="center" valign="top" bgcolor="white" style="border:5px solid #E9EBE2;"><br>';
		for (i = 0; i <= 22; i++) {
			k = this.keyPad.charAt(i);
			this.strHTML += '<input id="MagicVirtualPadKey' + i
					+ '" type="button" class="keyBoard_charIcons" value="' + k
					+ '" onMouseUp="' + this.name + '.clicked(' + i
					+ ')" onMouseDown="' + this.name + '.setStars(this);">';
			if (i == 12) {
				this.strHTML += '<br>'
			}
		}
		this.strHTML += '<input id="mask_numeric" type="button" class="keyBoard_numeric" value=" " onMouseUp="'
				+ this.name
				+ '.forwardClick()" style="position:absolute;display:none;" onMouseOut="'
				+ this.name + '.clearStars();">';
		this.strHTML += '<br /><br /><table cellpadding="0" cellspacing="0" border="0" align="center">';
		this.strHTML += '<tr>';
		this.strHTML += '<td><input type="button" value="KARIŞTIR" class="vpbtn" style="width:66px;" onClick="'
				+ this.name + '.obfuscate()"></td>';
		this.strHTML += '<td width="40" align="right"><input type="button" value="SİL" class="vpbtn" style="width:28px;color:#ffffff;padding-left:3px;" onClick="'
				+ this.name + '.del();" style="cursor:hand;"></td>';
		this.strHTML += '</tr>';
		this.strHTML += '</table>';
		this.strHTML += '<br /></td></tr>';
		this.strHTML += '</table>';
	}
}
MagicVirtualPad.prototype.updateKeyValues = function() {
	if (is.platform == 'mac' && (!is.ns || is.safari)) {
		this.createKeyBoard();
		document.getElementById('MagicVirtualPadLayer_' + this.type).innerHTML = this.strHTML;
	} else {
		if (this.type == "alpha") {
			for (i = 0; i <= 65; i++) {
				document.getElementById("M" + i).value = this.keyPad.charAt(i);
			}
		} else if (this.type == "numeric") {
			for (i = 0; i <= 9; i++) {
				document.getElementById("M" + i).value = this.keyPad.charAt(i);
			}
		} else if (this.type == "charIcons") {
			for (i = 0; i <= 22; i++) {
				document.getElementById('M' + i).value = this.keyPad.charAt(i);
			}
		}
	}
}
MagicVirtualPad.prototype.Ekle = function(_obj) {
	tmout = setTimeout('clicked2(' + _obj + ')', 1500);
}
MagicVirtualPad.prototype.Ekleme = function() {
	clearTimeout(tmout);
}
MagicVirtualPad.prototype.clicked = function(I) {
	if (this.mdown) {
		this.clearStars();
		this.currentKeyValue = this.keyPad.charAt(I);
		if (this.currentInputObject == 'none') {
			this.currentInputObject = "MusteriNumarasi";
		}
		if (MP.currentInputObject == "MusteriNumarasi" && I < 32) {
			return false;
		}
		if (document.getElementById(this.currentInputObject).value.length < this.maxlength) {
			document.getElementById(this.currentInputObject).value += this.currentKeyValue;
			if (!is.ns) {
				document.getElementById(this.currentInputObject).blur();
			}
		} else {
			if (I != -100 && alrt) {
				alert('Bu alana ' + this.maxlength
						+ ' karakterden fazla giremezsiniz.');
				return false;
			}
		}
		this.putFocus();
		if (this.karistir) {
			this.obfuscate();
		}
	}
}
MagicVirtualPad.prototype.loseFocus = function() {
	this.currentInputObject = 'none';
}
MagicVirtualPad.prototype.getFocus = function(o, ml, a) {
	this.maxlength = ml;
	this.open();
	this.currentInputObject = o;
	if (!a) {
		alrt = true;
	} else {
		alrt = false;
	}
}
MagicVirtualPad.prototype.putFocus = function() {
	if (this.currentInputObject != 'none') {
		document.getElementById(this.currentInputObject).focus();
	}
	this.open();
}
MagicVirtualPad.prototype.lowerCase = function() {
	this.clearStars();
	newPad = '';
	for (i = 0; i <= 65; i++) {
		newPad += lcase(this.keyPad.charAt(i));
	}
	newPad += ' ';
	this.cs = false;
	this.keyPad = newPad;
	ArrayKeyBoard = this.keyPad.split('');
	this.clicked(100);
	this.updateKeyValues();
}
MagicVirtualPad.prototype.upperCase = function() {
	this.clearStars();
	newPad = '';
	codeStr = '';
	for (i = 0; i <= 65; i++) {
		chr = ucase(this.keyPad.charAt(i));
		newPad += chr;
	}
	newPad += ' ';
	this.cs = true;
	this.keyPad = newPad;
	ArrayKeyBoard = this.keyPad.split('');
	this.clicked(100);
	this.updateKeyValues();
}
MagicVirtualPad.prototype.obfuscate = function() {
	this.clearStars();
	arr = this.keyPad.split('');
	if (this.type == "alpha") {
		for (i = 0; i <= 31; i++) {
			r = Math.floor(Math.random(0) * 32);
			tmp = arr[i];
			arr[i] = arr[r];
			arr[r] = tmp;
		}
		for (i = 32; i <= 41; i++) {
			r = Math.floor(Math.random(0) * 9);
			tmp = arr[i];
			arr[i] = arr[r + 32];
			arr[r + 32] = tmp;
		}
		for (i = 43; i <= 65; i++) {
			r = Math.floor(Math.random(0) * 23);
			tmp = arr[i];
			arr[i] = arr[r + 43];
			arr[r + 43] = tmp;
		}
		this.keyPad = arr.join('');
		if (this.cs) {
			this.upperCase();
		} else {
			this.lowerCase();
		}
	} else if (this.type == "numeric") {
		for (i = 0; i <= 9; i++) {
			r = Math.floor(Math.random(0) * 10);
			tmp = arr[i];
			arr[i] = arr[r];
			arr[r] = tmp;
		}
		this.keyPad = arr.join('');
		ArrayKeyBoard = this.keyPad.split('');
		this.updateKeyValues();
	} else if (this.type == "charIcons") {
		for (i = 0; i <= 23; i++) {
			r = Math.floor(Math.random(0) * 23);
			tmp = arr[i];
			arr[i] = arr[r];
			arr[r] = tmp;
		}
		this.keyPad = arr.join('');
		ArrayKeyBoard = this.keyPad.split('');
		this.updateKeyValues();
	}
}
MagicVirtualPad.prototype.setKaristir = function(obj) {
	if (this.karistir == true) {
		if (this.type == "alpha") {
			this.ChangeKeyboard('Q');
		} else if (this.type == "numeric") {
			this.ChangeKeyboard('A');
		}
		document.getElementById('sanalKlavyeKaristirButtonId').src = karistirButon;
		this.karistir = false;
	} else {
		this.karistir = true;
		document.getElementById('sanalKlavyeKaristirButtonId').src = sabitleButon;
	}
}
MagicVirtualPad.prototype.setStars = function(obj) {
	if (!this.mdown) {
		this.currentKeyObject = obj;
		obj.className = obj.className + " noborder";
		this.mdown = true;
		this.keyPadClon = this.keyPad;
		arr = this.keyPad.split('');
		for (i = 0; i < arr.length; i++) {
			arr[i] = this.mdownStr;
		}
		this.keyPad = arr.join('');
		if (!is.ie || is.platform != 'mac') {
			this.updateKeyValues();
			if (this.type == "alpha") {
				return false;
				cls = new Array();
				cls = this.currentKeyObject.className.split(' ');
				if (cls[0] && cls[0] != 'vpbtn') {
					xPos = parseInt(obj.offsetLeft)
							+ obj.offsetParent.offsetLeft + 14;
					yPos = parseInt(obj.offsetTop) + obj.offsetParent.offsetTop
							+ 27;
					if (is.ns6 && is.platform != 'mac') {
						xPos -= obj.offsetParent.offsetLeft + 15;
						yPos -= obj.offsetParent.offsetTop + 28;
					}
					document.getElementById("mask_" + this.type).style.width = obj.style.width;
					document.getElementById("mask_" + this.type).style.height = obj.style.height;
					document.getElementById("mask_" + this.type).className = cls[0];
					document.getElementById("mask_" + this.type).style.top = yPos;
					document.getElementById("mask_" + this.type).style.left = xPos;
					document.getElementById("mask_" + this.type).style.display = 'none';
					document.getElementById("mask_" + this.type).value = this.mdownStr;
				}
			} else if (this.type == "numeric") {
				xPos = parseInt(obj.offsetLeft) + obj.offsetParent.offsetLeft
						+ 4;
				yPos = parseInt(obj.offsetTop) + obj.offsetParent.offsetTop + 4;
				if (is.ns6 && is.platform != 'mac') {
					xPos = parseInt(obj.offsetLeft)
							+ obj.offsetParent.offsetLeft - 1;
					yPos = parseInt(obj.offsetTop) + obj.offsetParent.offsetTop
							- 1;
				}
				cls = new Array();
				cls = this.currentKeyObject.className.split(' ');
				document.getElementById("mask_" + this.type).style.width = obj.style.width;
				document.getElementById("mask_" + this.type).className = cls[0];
				document.getElementById("mask_" + this.type).style.top = yPos;
				document.getElementById("mask_" + this.type).style.left = xPos;
				document.getElementById("mask_" + this.type).style.display = 'none';
				document.getElementById("mask_" + this.type).value = this.mdownStr;
			} else if (this.type == "charIcons") {
				xPos = parseInt(obj.offsetLeft) + obj.offsetParent.offsetLeft
						+ 4;
				yPos = parseInt(obj.offsetTop) + obj.offsetParent.offsetTop + 4;
				if (is.ns6 && is.platform != 'mac') {
					xPos = parseInt(obj.offsetLeft)
							+ obj.offsetParent.offsetLeft - 1;
					yPos = parseInt(obj.offsetTop) + obj.offsetParent.offsetTop
							- 1;
				}
				cls = new Array();
				cls = this.currentKeyObject.className.split(' ');
				document.getElementById("mask_" + this.type).style.width = obj.style.width;
				document.getElementById("mask_" + this.type).className = cls[0];
				document.getElementById("mask_" + this.type).style.top = yPos;
				document.getElementById("mask_" + this.type).style.left = xPos;
				document.getElementById("mask_" + this.type).style.display = 'none';
				document.getElementById("mask_" + this.type).value = this.mdownStr;
			}
		}
	}
}
MagicVirtualPad.prototype.clearStars = function() {
	if (this.mdown) {
		cls = new Array();
		cls = this.currentKeyObject.className.split(' ');
		this.currentKeyObject.className = cls[0];
		this.keyPad = this.keyPadClon;
		this.mdown = false;
		if (!is.ie || is.platform != 'mac') {
			if (this.type == "alpha") {
				this.updateKeyValues();
				document.getElementById("mask_" + this.type).style.display = 'none';
			} else if (this.type == "numeric") {
				this.updateKeyValues();
				document.getElementById("mask_" + this.type).style.display = 'none';
			} else if (this.type == "charIcons") {
				this.updateKeyValues();
				document.getElementById("mask_" + this.type).style.display = 'none';
			}
		}
		if (!is.ns) {
			this.currentKeyObject.blur();
		}
	}
}
MagicVirtualPad.prototype.ChangeKeyboard = function(K) {
	if (this.type == "alpha") {
		this.clearStars();
		if (K == 'Q') {
			this.keyPad = this.QPad;
			this.karistir = false;
			document.getElementById('sanalKlavyeKaristirButtonId').src = karistirButon;
		}
		if (K == 'A') {
			this.keyPad = this.APad;
			this.karistir = false;
			document.getElementById('sanalKlavyeKaristirButtonId').src = karistirButon;
		}
		if (this.cs) {
			this.upperCase();
		} else {
			this.lowerCase();
		}
	} else if (this.type == "numeric") {
		if (K == 'A') {
			this.keyPad = this.APad;
			this.karistir = false;
			document.getElementById('sanalKlavyeKaristirButtonId').src = karistirButon;
		}
		this.clearStars();
		this.updateKeyValues();
	}
}
MagicVirtualPad.prototype.clear = function() {
	if (this.currentInputObject != 'none') {
		document.getElementById(this.currentInputObject).value = '';
		this.putFocus();
	}
}
MagicVirtualPad.prototype.forwardClick = function() {
	if (this.type == "alpha") {
		i = parseInt(this.currentKeyObject.id.substring(1, 3));
	} else if (this.type == "numeric") {
		i = parseInt(this.currentKeyObject.id.substr(
				this.currentKeyObject.id.length - 1, 1));
	} else if (this.type == "charIcons") {
		i = parseInt(this.currentKeyObject.id.substr(
				this.currentKeyObject.id.length - 1, 1));
	}
	this.clicked(i);
}
function keyboardMessage() {
	alert('Şifrenizi girerken lütfen Sanal Klavye\'yi kullanınız.');
	return false;
}
function textboxposition(elm, type) {
	if (!type) {
		type = "alpha";
	}
	document.getElementById("MagicVirtualPadLayer_" + type).style.top = 0;
	document.getElementById("MagicVirtualPadLayer_" + type).style.left = 0;
	var ref = elm;
	var elmOffsetTop = elmOffsetLeft = 0;
	while (ref != document.body) {
		elmOffsetTop += ref.offsetTop;
		elmOffsetLeft += ref.offsetLeft;
		ref = ref.offsetParent;
	}
	yPos = elmOffsetTop + 25;
	xPos = elmOffsetLeft + 30;
	document.getElementById("MagicVirtualPadLayer_" + type).style.top = yPos;
	document.getElementById("MagicVirtualPadLayer_" + type).style.left = 0;
	textboxpositionstatus[type] = true;
}
function clicked2(_obj) {
	if (MP.chkMouseOver) {
		MP.clearStars();
		MP.currentKeyValue = MP.keyPad.charAt(_obj);
		if (MP.currentInputObject == 'none') {
			MP.currentInputObject = "MusteriNumarasi";
		}
		if (MP.currentInputObject == "MusteriNumarasi" && _obj < 32) {
			return false;
		}
		if (document.getElementById(MP.currentInputObject).value.length < MP.maxlength) {
			document.getElementById(MP.currentInputObject).value += MP.currentKeyValue;
			if (!is.ns) {
				document.getElementById(MP.currentInputObject).blur();
			}
		} else {
			alert('Bu alana ' + MP.maxlength
					+ ' karakterden fazla giremezsiniz.');
			return false;
		}
		MP.putFocus();
		tmout = setTimeout('clicked2(' + _obj + ')', 1500);
	}
}